Make json ArgumentType accept anything but undefined #545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We accidentally introduced a small breaking change in 1.3.0. Before that version was released, arguments passed to Buidler tasks weren't validated. The only thing Buidler knew how to do was parsing strings into those values.
Starting with Buidler 1.3.0, we introduced runtime type validations when running tasks programmatically. This validation logic was off for the json type, as some values that could be parsed from strings into jsons, were accepted by the validation strategy.
This PR fixes this, by accepting anything but
undefined
as a validjson
argument.Thanks @gitpusha for reporting this issue.